using Pegasus.Diagnostics;
using System;

namespace Pegasus.Monitoring
{
	/// <summary>
	/// This clas
	/// </summary>
	public class AppStatusResults
	{
		/// <summary>
		/// 
		/// </summary>
		internal AppStatusResults()
		{
		}
		
		/// <summary>
		/// 
		/// </summary>
		/// <param name="conditionName"></param>
		public void SetPassedCondition( string conditionName )
		{
			// Check params
			ParamCode.AssertNotEmpty( conditionName, "conditionName" );

			SetCondition( conditionName, true, null );
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="conditionName"></param>
		/// <param name="message"></param>
		/// <param name="args"></param>
		public void SetPassedCondition( string conditionName, string message, params object[] args )
		{
			// Check params
			ParamCode.AssertNotEmpty( conditionName, "conditionName" );
			ParamCode.AssertNotEmpty( message, "message" );

			SetCondition( conditionName, true, message, args );
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="conditionName"></param>
		/// <param name="message"></param>
		/// <param name="args"></param>
		public void SetFailedCondition( string conditionName, string message, params object[] args )
		{
			// Check params
			ParamCode.AssertNotEmpty( conditionName, "conditionName" );
			ParamCode.AssertNotEmpty( message, "message" );

			SetCondition( conditionName, false, message, args );
		}

		/// <summary>
		/// 
		/// </summary>
		/// <param name="conditionName"></param>
		/// <param name="passed"></param>
		/// <param name="message"></param>
		/// <param name="args"></param>
		public void SetCondition( string conditionName, bool passed, string message, params object[] args )
		{
			// Check params
			ParamCode.AssertNotEmpty( conditionName, "conditionName" );
			if( !passed )
			{
				ParamCode.AssertNotEmpty( message, "message" );
			}

			// TODO Implement
		}
	}
}
